package com.martin.dms.dataservices;

import java.util.List;

import com.martin.dms.model.Supplier;

/**
 * Data service for the Supplier entity.
 * 
 * @author mstvetkov
 */
public interface SupplierDataService extends DMSDataService<Supplier> {

    /**
     * Updates the name of a supplier.
     * 
     * @param supplierId - the id of the supplier.
     * @param name - the new name.
     */
    public void updateName(long supplierId, String name);

    /**
     * Updates the email of a supplier.
     * 
     * @param supplierId - the id of the supplier.
     * @param email - the new email.
     */
    public void updateEmail(long supplierId, String email);

    /**
     * Updates the address of a supplier.
     * 
     * @param supplierId - the id of the supplier.
     * @param address - the new address.
     */
    public void updateAddress(long supplierId, String address);

    /**
     * Updates the phone number of a supplier.
     * 
     * @param supplierId - the id of the supplier.
     * @param phoneNumber - the new phone number.
     */
    public void updatePhoneNumber(long supplierId, String phoneNumber);

    /**
     * Updates the whole information about a supplier.
     * 
     * @param supplierId - the id of the supplier.
     * @param name - the new name.
     * @param email - the new email.
     * @param address - the new address.
     * @param phoneNumber - the new phone number.
     */
    public void update(long supplierId, String name, String email, String address, String phoneNumber);

    /**
     * Adds an item to a supplier.
     * 
     * @param supplierId - the id of the supplier.
     * @param itemId - the id of the item.
     */
    public void addItem(long supplierId, long itemId);

    /**
     * Adds a list of items to a supplier.
     * 
     * @param supplierId - the id of the supplier.
     * @param itemIds - a list with the ids of the items.
     */
    public void addItems(long supplierId, List<Long> itemIds);

    /**
     * Removes an item from a supplier.
     * 
     * @param supplierId - the id of the supplier.
     * @param itemId - the id of the item.
     */
    public void removeItem(long supplierId, long itemId);

    /**
     * Removes a list of items from a supplier.
     * 
     * @param supplierId - the id of the supplier.
     * @param itemIds - a list with the ids of the items.
     */
    public void removeItems(long supplierId, List<Long> itemIds);
}
